package com.aidex.biz.service.impl;

import com.aidex.biz.domain.JinjianCheckFiles;
import com.aidex.biz.mapper.JinjianCheckFilesMapper;
import com.aidex.biz.service.JinjianCheckFilesService;
import com.aidex.common.annotation.DataScope;
import com.aidex.common.core.service.BaseServiceImpl;
import com.aidex.common.utils.NumberUtils;
import com.github.pagehelper.PageInfo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 进件归档资料Service业务层处理
 * @author sean
 * @email 2074844820@qq.com
 * @date 2025-07-22
 */
@Service
@Transactional(readOnly = true)
public class JinjianCheckFilesServiceImpl extends BaseServiceImpl<JinjianCheckFilesMapper, JinjianCheckFiles> implements JinjianCheckFilesService
{
    private static final Logger log = LoggerFactory.getLogger(JinjianCheckFilesServiceImpl.class);

    /**
     * 获取单条数据
     * @param jinjianCheckFiles 进件归档资料
     * @return 进件归档资料
     */
    @Override
    public JinjianCheckFiles get(JinjianCheckFiles jinjianCheckFiles)
    {
        JinjianCheckFiles dto = super.get(jinjianCheckFiles);
        return dto;
    }

    /**
     * 获取单条数据
     * @param id 进件归档资料id
     * @return 进件归档资料
     */
    @Override
    public JinjianCheckFiles get(String id)
    {
        JinjianCheckFiles dto = super.get(id);
        return dto;
    }


    /**
     * 查询进件归档资料列表
     * @param jinjianCheckFiles 进件归档资料
     * @return 进件归档资料
     */
    @Override
    @DataScope(userAlias = "a",deptAlias = "a")
    public List<JinjianCheckFiles> findList(JinjianCheckFiles jinjianCheckFiles)
    {
        return super.findList(jinjianCheckFiles);
    }

    /**
     * 分页查询进件归档资料列表
     * @param jinjianCheckFiles 进件归档资料
     * @return 进件归档资料
     */
    @Override
    @DataScope(userAlias = "a",deptAlias = "a")
    public PageInfo<JinjianCheckFiles> findPage(JinjianCheckFiles jinjianCheckFiles)
    {
        return super.findPage(jinjianCheckFiles);
    }

    /**
     * 保存进件归档资料
     * @param jinjianCheckFiles
     * @return 结果
     */
    @Override
    public boolean save(JinjianCheckFiles jinjianCheckFiles)
    {
        return super.save(jinjianCheckFiles);
    }


    /**
     * 删除进件归档资料信息
     * @param jinjianCheckFiles
     * @return 结果
     */
    @Override
    public boolean remove(JinjianCheckFiles jinjianCheckFiles)
    {
        return super.remove(jinjianCheckFiles);
    }

    /**
     * 批量删除进件归档资料
     * @param ids 需要删除的进件归档资料ID
     * @return 结果
     */
    @Transactional(readOnly = false)
    @Override
    public int deleteJinjianCheckFilesByIds(String[] ids)
    {
        return mapper.deleteJinjianCheckFilesByIds(ids);
    }

    /**
     * 获取最大编号
     * @param jinjianCheckFiles 进件归档资料
     * @return 结果
     */
    @Override
    public int findMaxSort(JinjianCheckFiles jinjianCheckFiles)
    {
        return NumberUtils.nextOrder(mapper.findMaxSort(jinjianCheckFiles));
    }
}
